Skip to content

Conversation

@gregfromstl
Copy link
Contributor

@gregfromstl gregfromstl commented Feb 13, 2025


PR-Codex overview

This PR focuses on fixing the display of fiat values in the PayEmbed component by ensuring they are formatted to two decimal places.

Detailed summary

  • Updated the return statement in the FiatValue.tsx file.
  • Changed the formatting of the fiat value to use .toFixed(2) for consistent two decimal place display.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@gregfromstl gregfromstl requested review from a team as code owners February 13, 2025 00:12
@linear
Copy link

linear bot commented Feb 13, 2025

@changeset-bot
Copy link

changeset-bot bot commented Feb 13, 2025

🦋 Changeset detected

Latest commit: e89b560

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
thirdweb Patch
@thirdweb-dev/wagmi-adapter Patch
thirdweb-login Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Feb 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2025 0:21am
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2025 0:21am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2025 0:21am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2025 0:21am
wallet-ui 🛑 Canceled (Inspect) Feb 13, 2025 0:21am

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Feb 13, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 13, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 46.3 KB (0%) 926 ms (0%) 1.2 s (+52.06% 🔺) 2.2 s
thirdweb (cjs) 121.89 KB (0%) 2.5 s (0%) 2.1 s (+5.14% 🔺) 4.5 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 112 ms (0%) 210 ms (+187.68% 🔺) 322 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 65 ms (+145.44% 🔺) 75 ms
thirdweb/react (minimal + tree-shaking) 19.29 KB (0%) 386 ms (0%) 167 ms (-49.8% 🔽) 553 ms

return cryptoToFiatQuery.data?.result ? (
<Text {...props}>${formatNumber(cryptoToFiatQuery.data.result, 2)}</Text>
<Text {...props}>
${formatNumber(cryptoToFiatQuery.data.result, 2).toFixed(2)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't the 2 param inside formatNumber already does it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't, format number just rounds it but leaves off trailing zeros (it returns a number)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see

@joaquim-verges joaquim-verges merged commit 52cbcd2 into main Feb 15, 2025
29 of 30 checks passed
@joaquim-verges joaquim-verges deleted the greg/tool-3408-pay-embed-fix-fiat-value-truncating-trailing-0s branch February 15, 2025 20:54
@joaquim-verges joaquim-verges mentioned this pull request Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants